Use *font for Xft font names for Lucid menus and dialogs.
authorJan D. <jan.h.d@swipnet.se>
Mon, 14 Feb 2011 17:21:10 +0000 (18:21 +0100)
committerJan D. <jan.h.d@swipnet.se>
Mon, 14 Feb 2011 17:21:10 +0000 (18:21 +0100)
commit9ff803234913e7273729a11bdfa1bb10687c8c2b
tree5a474612afe94259113212cab72fe84782c9e815
parent1dae4c7321a975cb4d36761cb31aa79fd236cb4a
Use *font for Xft font names for Lucid menus and dialogs.

* doc/emacs/xresources.texi (X Resources): Remove *faceName and replace it with
*font for Lucid.

* lwlib/lwlib-Xaw.c (make_dialog): Use *font even for Xft fonts.  Try
XLoadQueryFont first and then Xft fonts.

* lwlib/xlwmenu.c (xlwmenu_default_font): Remove, does not work for
multi-display.
(xlwMenuResources): Remove XtNfaceName and XtNdefaultFace.
Make XtNFont a String resource.
(make_windows_if_needed): Call XFlush so later changes are seen by the
X server.
(remap_menubar): Use XtMoveWidget and then
XtResizeWidget/XtResizeWindow after XtPopup.  Works better with
Compiz.
(make_drawing_gcs): Check if mw->menu.font is set.
(getDefaultXftFont): New function.
(openXftFont): faceName is now fontName.  Try XLoadQueryFont first
and then XftFontOpenName.
(XlwMenuInitialize): Initialize mw->menu.font with XLoadQueryFont.
(XlwMenuClassInitialize): Remove initialization of
xlwmenu_default_font.
(fontname_changed): Renamed from facename_changed.
(XlwMenuSetValues): Use facename_changed.

* lwlib/xlwmenu.h: Remove Xt[CN]faceName and Xt[NC]defaultFace.

* lwlib/xlwmenuP.h (_XlwMenu_part): Remove faceName.  Add fontName.

* src/xmenu.c (apply_systemfont_to_dialog): Apply to *dialog.font.
(apply_systemfont_to_menu): Set resources *menubar*font and
*popup*font.  Remove defflt.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu before lw_create_widget.

* src/xrdb.c (x_load_resources): For LUCID and XFT, don't put a
resource that specifies helvetica for menus and dialogs.
doc/emacs/ChangeLog
doc/emacs/xresources.texi
etc/NEWS
lwlib/ChangeLog
lwlib/lwlib-Xaw.c
lwlib/xlwmenu.c
lwlib/xlwmenu.h
lwlib/xlwmenuP.h
src/ChangeLog
src/xmenu.c
src/xrdb.c